package de.tabuma.shopping.logik;

import de.tabuma.shopping.entity.*;
import java.util.*;

/**
 *
 * @author alefen
 */
public class UserOrderRelationFacade {

    public static int create(UserOrderRelation usergroup, String user) {
        return (int) PMF.doCreate(usergroup, user);
    }

    public static UserOrderRelation get(int id) {
        return PMF.get(id, new UserOrderRelation());
    }

    public static void remove(int id, String user) {
        UserOrderRelation usergroup = get(id);
        PMF.doRemove(usergroup, user);
    }

    public static List<UserOrderRelation> getList(int orderId) {
        String keys[] = {"order"};
        String values[] = {""+orderId};
        return PMF.get(keys, values, new UserOrderRelation());
    }

    public static List<UserOrderRelation> getList1(String user) {
        String keys[] = {"user"};
        String values[] = {user};
        return PMF.get(keys, values, new UserOrderRelation());
    }

}